package demo;

public class ThreadDemo {

    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();

        Thread runThread = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    System.out.println("runThread"+Thread.currentThread().getName()+"----->"+ i);
                }
            }
        });
        runThread.start();

        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"----->"+ i);
        }


    }

}
